---
title: clsHazardGroup
summary: API reference for clsHazardGroup.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.Policy
reference_type: embedded
---

# clsHazardGroup

Represents one effective-dated hazard-group row loaded by `clsHazardGroupCollection` from `HAZARD_GROUP`. The object carries the business identifier, NCCI code, descriptions, and audit columns for a single classification record, while relying on BOF base behavior for edit-state management and validation/error surfacing†.

## Purpose
- Preserve one hazard-group classification record after the collection retrieve flow materializes it from Oracle.
- Expose the code, descriptions, effective window, and audit metadata that downstream policy components read.
- Participate in framework validation and UI error surfacing through inherited BOF infrastructure†.

## Context
- Namespace: `SAIF.Business.Policy`
- Assembly/package: `SAIF.Business.Policy`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `HazardGroupID` | `Public ReadOnly Property HazardGroupID() As String` | Primary business key used for equality checks and collection lookups. |
| `NCCIHazardGroupCode` | `Public ReadOnly Property NCCIHazardGroupCode() As String` | External hazard-group code associated with the record returned from `HAZARD_GROUP`. |
| `ShortDescription` | `Public ReadOnly Property ShortDescription() As String` | Short label shown for the hazard group. |
| `LongDescription` | `Public ReadOnly Property LongDescription() As String` | Longer narrative description for the hazard group. |
| `EffectiveDate` | `Public ReadOnly Property EffectiveDate() As Date` | Start date for the record's active window. |
| `ExpirationDate` | `Public ReadOnly Property ExpirationDate() As Date` | End date for the record's active window when one exists. |
| `CreateDate` | `Public ReadOnly Property CreateDate() As Date` | Audit timestamp for when the hazard-group row was created. |
| `CreateUser` | `Public ReadOnly Property CreateUser() As String` | Audit user recorded when the row was created. |
| `UpdateDate` | `Public ReadOnly Property UpdateDate() As Date` | Audit timestamp for the most recent update when present. |
| `UpdateUser` | `Public ReadOnly Property UpdateUser() As String` | Audit user recorded for the most recent update when present. |
| `MyCriteria` | `Public ReadOnly Property MyCriteria() As Criteria` | Returns the criteria instance attached during `Load`, primarily to retain the originating data-portal context. |
| `IsValid` | `Public Overrides ReadOnly Property IsValid() As Boolean` | Returns the base validation state; this library adds no hazard-group-specific rules. |
| `IsSavable` | `Public Overrides ReadOnly Property IsSavable() As Boolean` | Exposes the base savability result for callers that inspect BOF object state. |
| `Equals` | `Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean` | Compares two objects as hazard groups so callers can test identity without casting. |
| `Equals` | `Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean` | Applies hazard-group identity comparison when the caller supplies an untyped object. |
| `Equals` | `Public Overloads Function Equals(ByVal inObject As clsHazardGroup) As Boolean` | Treats two hazard groups as the same business record when their `HazardGroupID` values match. |
| `GetHashCode` | `Public Overrides Function GetHashCode() As Integer` | Derives a hash code from `HazardGroupID` so keyed collections align with the equality rule. |
| `ToString` | `Public Overrides Function ToString() As String` | Returns the hazard-group identifier for logging and display. |

## Nested types
### Criteria

`clsHazardGroup.Criteria` exists so the framework can attach `IDataPortalInfo` to a retrieved object after `Load` completes. Although the type is public, its SQL members are `Friend`-scoped and deliberately reject every CRUD SQL access because `clsHazardGroup` is not retrieved directly.

| Member | Signature | Purpose |
| --- | --- | --- |
| `New` | `Public Sub New(ByVal inDataPortalInfo As IDataPortalInfo)` | Stores the data-portal context that `Load` attaches to the hydrated object. |
| `DataPortalInfo` | `Friend Property DataPortalInfo() As IDataPortalInfo` | Supplies the framework portal context used by BOF lifecycle code after hydration. |
| `CreateSQL` | `Friend ReadOnly Property CreateSQL() As String` | Always throws `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` to block create SQL on this retrieve-only criteria type. |
| `DeleteSQL` | `Friend ReadOnly Property DeleteSQL() As String` | Always throws `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` to block delete SQL on this retrieve-only criteria type. |
| `InsertSQL` | `Friend ReadOnly Property InsertSQL() As String` | Always throws `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` to block insert SQL on this retrieve-only criteria type. |
| `RetrieveSQL` | `Friend ReadOnly Property RetrieveSQL() As String` | Always throws `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` because the collection, not the child object, owns the retrieve statement. |
| `UpdateSQL` | `Friend ReadOnly Property UpdateSQL() As String` | Always throws `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` to block update SQL on this retrieve-only criteria type. |

## Inherited public members
### From clsBusinessBase (SAIF.Framework.Core)

Members in this section are inherited from `clsBusinessBase` in `SAIF.Framework.Core`.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| `Rules` | `Public ReadOnly Property Rules As clsRulesManager` | Owns the rule manager that registered BOF rules run through, including named `CheckRules(...)` calls.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| `BeginEdit` | `Public Sub BeginEdit()` | Opens an in-memory edit scope for the business object before callers make coordinated changes.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| `CancelEdit` | `Public Sub CancelEdit()` | Rolls back the current edit scope instead of committing pending in-memory changes.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| `ApplyEdit` | `Public Sub ApplyEdit()` | Commits the current in-memory edit scope so the edited state becomes the active object state.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| `Error` | `Public ReadOnly Property Error As String` | Surfaces aggregate broken-rule text to data-binding consumers through `IDataErrorInfo`.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| `Item` | `Public ReadOnly Property Item(columnName As String) As String` | Returns the broken-rule message associated with a specific bound field through `IDataErrorInfo`.† | `SAIF.Framework.Core` — `clsBusinessBase` |

## Behavioral notes
- `Load` copies ten columns from the `HAZARD_GROUP` reader, creates a new criteria object with portal info, and marks the instance old before returning it to the collection.
- Equality and hash code are based only on `HazardGroupID`, so two records with the same identifier compare equal even if other fields differ.
- Failed BOF rule checks are tracked in the base broken-rule collection and exposed through `Error` and `Item`.†

## Constraints and usage notes
- Callers normally receive instances through `clsHazardGroupCollection.GetHazardGroups`; the class exposes no direct retrieve factory of its own.
- The nested criteria object is retrieve-only; every CRUD SQL property throws when accessed.

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. They describe inherited behavior from the
> indicated origin library and should be verified if the dependency version changes.

## Sources
- `SAIF.Business.Policy\clsHazardGroup.vb`